<template>
  <div>
    <van-swipe :autoplay="3000" indicator-color="white">
      <van-swipe-item v-for="(image, index) in img" :key="index">
        <van-image fit="cover" class="img" :src="image.img"></van-image>
      </van-swipe-item>
    </van-swipe>
  </div>
</template>

<script>
export default {
  name: 'HomeSwiper',
  props: {
    img: Array
  },
  data () {
    return {
    }
  },
  methods: {

  }
}
</script>

<style scoped>
    .van-swipe{
        height: 15rem;
        width: 100%;
    }
    .img{
        width: 100%;
        height: 100%;
        background-size: contain;
    }
</style>
